<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!--  判断两个对象的键值对是否相同 -->
    <script>
        var obj1 = {
            name :'xiao ming',
            age:20
        }
        var obj2 = {
            name : 'xiao chen',
            age:21
        }
        for(var Arr1 in obj1){};
        for(var Arr2 in obj2){};
        if(obj1[Arr1] == obj2[Arr2]){
            alert('两个对象的键值相同')
        }else{
            alert('两个对象的简直不相同');
        }
    </script>
</body>
</html>